const Router = require('koa-router');
const { verifyAuth } = require('../middleware/auth.middleware');
const { create, remove, update, list } = require('../controller/opus.controller');

const opusRouter = new Router({ prefix: "/opus" });

// 创建一个作品
opusRouter.post("/", verifyAuth, create);
// 删除一个作品
opusRouter.delete("/", verifyAuth, remove);
// 修改一个作品
opusRouter.patch("/", verifyAuth, update);
// 获取作品列表
opusRouter.get("/", list);

module.exports = opusRouter;

